/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.uoc.tdp.pac4.only5.manager;

import edu.uoc.tdp.pac4.only5.domain.Booking;
import edu.uoc.tdp.pac4.only5.domain.Payment;
import edu.uoc.tdp.pac4.only5.exceptions.EespaisDatabaseException;
import edu.uoc.tdp.pac4.only5.vo.BookingPaymentVO;
import edu.uoc.tdp.pac4.only5.vo.UserBookingVO;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Date;
import java.util.List;

/**
 *
 * @author Josep
 */
public interface BookingManager extends Remote {

    public Booking getBooking(int bookingId)throws RemoteException;
    public boolean isNewBookingPossible(Booking booking)throws RemoteException;
    public void saveBooking(Booking booking)throws RemoteException, EespaisDatabaseException;
    public void allocateBooking(Booking booking)throws RemoteException;
    public void cancelBooking(Booking booking)throws RemoteException;
    public List<Booking> getNonAllocatedBookings()throws RemoteException;
    public Double getCancellationFee(Booking booking)throws RemoteException;
    public List<Booking> getBookings(String userId, Integer spaceId, Date from, Date to)throws RemoteException, EespaisDatabaseException;
    
   
    public List<UserBookingVO> getBookingsVO(String userId, Integer spaceId, Date from, Date to,String estado)throws RemoteException;
    public void UpdateCancelBooking(int bookingId, String causa,String userAdm)throws RemoteException, EespaisDatabaseException;
    public int calculaRecargo(Booking booking,Payment pay) throws RemoteException;
    
    public List<BookingPaymentVO> getHistoricOfUser(String userId) throws RemoteException, EespaisDatabaseException;
    
    public Integer getLastValueSequence() throws EespaisDatabaseException, RemoteException;
}
